﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Objects.DataClasses;
using Headlight.Model;
using Headlight.Infrastructure.Domain;

namespace Headlight.Repositories
{
	public class QuoteRepository : IRepository<Quote, int>
	{
        private HeadlightDbContext context = new EFDbContext();

        public IQueryable<Quote> Quotes
        {
            get { return context.Quotes; }
        }

        public void Save(Quote quote)
        {
            if (quote.QuoteID == 0)
            {
                context.Quotes.Add(quote);
            }
            context.SaveChanges();
        }

	}
}